package com.xbs.service.user;

import java.util.List;

import com.xbs.dao.conn.ParamSet;
import com.xbs.dao.user.ConsumerDao;
import com.xbs.entity.ConsumerEntity;

/**
 * 后台用户管理业务处理类
 * @author Administrator
 *
 */
public class ConsumerService {

	private ConsumerDao consumerDao;
	
	public ConsumerService(){
		consumerDao = new ConsumerDao();
	}
	
	/**
	 * 1.根据删除状态查询所有用户信息
	 * @return
	 */
	public List<ConsumerEntity> selAll(int status){
		
		return consumerDao.selAll(status);
	}
	
	/**
	 * 2.根据用户名或电话查询用户信息
	 * @return
	 */
	public List<ConsumerEntity> selAll1(String nametel){
		
		return consumerDao.selAll1(nametel);
	}
	
	/**
	 * 3.添加用户信息
	 * @return
	 */
	public int insert(String name, String idcard, String telphone, String password, String paypassword, String email){
	
		return consumerDao.insert(name, idcard, telphone, password, paypassword, email);
	}

	/**
	 * 4.逻辑删除用户信息
	 * @return
	 */
	public int delete(String idcard){
		
		return consumerDao.delete(idcard);
	}
	
	/**
	 * 5.根据身份证号码查询用户信息
	 * @return
	 */
	public List<ConsumerEntity> selAll2(String idcard){
		
		return consumerDao.selAll2(idcard);
	}
	
	/**
	 * 6.根据身份证号码修改用户信息
	 * @return
	 */
	public int update(String name, String idcard, String telphone, String password, String paypassword, String email){
		
		return consumerDao.update(name, idcard, telphone, password, paypassword, email);
	}
}
